Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

IF3(true, b3, x, y, i, h) → IF4(b3, x, y, i, h)
IF4(false, x, y, i, h) → UNION(rest(i), h)
REACH(x, y, i, h) → IF1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
IF4(false, x, y, i, h) → TO(i)
IF3(false, b3, x, y, i, h) → FROM(i)
REACH(x, y, i, h) → TO(i)
REACH(x, y, i, h) → FROM(i)
REACH(x, y, i, h) → EQ(x, y)
REACH(x, y, i, h) → EQ(y, to(i))
IF3(false, b3, x, y, i, h) → REST(i)
IF4(false, x, y, i, h) → OR(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))
REACH(x, y, i, h) → ISEMPTY(i)
IF3(false, b3, x, y, i, h) → REACH(x, y, rest(i), edge(from(i), to(i), h))
IF2(false, b2, b3, x, y, i, h) → IF3(b2, b3, x, y, i, h)
REACH(x, y, i, h) → EQ(x, from(i))
IF1(false, b1, b2, b3, x, y, i, h) → IF2(b1, b2, b3, x, y, i, h)
IF4(false, x, y, i, h) → REST(i)
IF4(false, x, y, i, h) → REACH(to(i), y, union(rest(i), h), empty)
IF4(false, x, y, i, h) → REACH(x, y, rest(i), h)
UNION(edge(x, y, i), h) → UNION(i, h)
EQ(s(x), s(y)) → EQ(x, y)
IF3(false, b3, x, y, i, h) → TO(i)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF3(true, b3, x, y, i, h) → IF4(b3, x, y, i, h)
IF4(false, x, y, i, h) → UNION(rest(i), h)
REACH(x, y, i, h) → IF1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
IF4(false, x, y, i, h) → TO(i)
IF3(false, b3, x, y, i, h) → FROM(i)
REACH(x, y, i, h) → TO(i)
REACH(x, y, i, h) → FROM(i)
REACH(x, y, i, h) → EQ(x, y)
REACH(x, y, i, h) → EQ(y, to(i))
IF3(false, b3, x, y, i, h) → REST(i)
IF4(false, x, y, i, h) → OR(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))
REACH(x, y, i, h) → ISEMPTY(i)
IF3(false, b3, x, y, i, h) → REACH(x, y, rest(i), edge(from(i), to(i), h))
IF2(false, b2, b3, x, y, i, h) → IF3(b2, b3, x, y, i, h)
REACH(x, y, i, h) → EQ(x, from(i))
IF1(false, b1, b2, b3, x, y, i, h) → IF2(b1, b2, b3, x, y, i, h)
IF4(false, x, y, i, h) → REST(i)
IF4(false, x, y, i, h) → REACH(to(i), y, union(rest(i), h), empty)
IF4(false, x, y, i, h) → REACH(x, y, rest(i), h)
UNION(edge(x, y, i), h) → UNION(i, h)
EQ(s(x), s(y)) → EQ(x, y)
IF3(false, b3, x, y, i, h) → TO(i)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 3 SCCs with 13 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

UNION(edge(x, y, i), h) → UNION(i, h)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


UNION(edge(x, y, i), h) → UNION(i, h)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(edge(x1, x2, x3)) = 1 + (4)x_3   
POL(UNION(x1, x2)) = (4)x_1   
The value of delta used in the strict ordering is 4.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ(s(x), s(y)) → EQ(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


EQ(s(x), s(y)) → EQ(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(EQ(x1, x2)) = (3)x_2   
POL(s(x1)) = 4 + (2)x_1   
The value of delta used in the strict ordering is 12.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP

Q DP problem:
The TRS P consists of the following rules:

IF3(true, b3, x, y, i, h) → IF4(b3, x, y, i, h)
IF2(false, b2, b3, x, y, i, h) → IF3(b2, b3, x, y, i, h)
IF1(false, b1, b2, b3, x, y, i, h) → IF2(b1, b2, b3, x, y, i, h)
REACH(x, y, i, h) → IF1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
IF4(false, x, y, i, h) → REACH(to(i), y, union(rest(i), h), empty)
IF4(false, x, y, i, h) → REACH(x, y, rest(i), h)
IF3(false, b3, x, y, i, h) → REACH(x, y, rest(i), edge(from(i), to(i), h))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
union(empty, h) → h
union(edge(x, y, i), h) → edge(x, y, union(i, h))
isEmpty(empty) → true
isEmpty(edge(x, y, i)) → false
from(edge(x, y, i)) → x
to(edge(x, y, i)) → y
rest(edge(x, y, i)) → i
rest(empty) → empty
reach(x, y, i, h) → if1(eq(x, y), isEmpty(i), eq(x, from(i)), eq(y, to(i)), x, y, i, h)
if1(true, b1, b2, b3, x, y, i, h) → true
if1(false, b1, b2, b3, x, y, i, h) → if2(b1, b2, b3, x, y, i, h)
if2(true, b2, b3, x, y, i, h) → false
if2(false, b2, b3, x, y, i, h) → if3(b2, b3, x, y, i, h)
if3(false, b3, x, y, i, h) → reach(x, y, rest(i), edge(from(i), to(i), h))
if3(true, b3, x, y, i, h) → if4(b3, x, y, i, h)
if4(true, x, y, i, h) → true
if4(false, x, y, i, h) → or(reach(x, y, rest(i), h), reach(to(i), y, union(rest(i), h), empty))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.